<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <div v-font="font">Hello !</div>
</div>
</body>
<script src="../../js/vue.js"></script>
<script type="text/javascript">
    Vue.directive('font',{
        bind:function (el,binding,vnode) {
            el.style.color=binding.value.color
            el.style['font-size']=binding.value.size
        }
    })
    var vm=new Vue({
        el:'#app',
        data(){
            return{
                font:{
                    size:'26px',
                    color:'red'
                }
            }
        }
    })
</script>
</html>
